<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-商品列表">
</@frame.head>

 	<style type="text/css">
 		.td_c{
 			text-align: center;
 		}
 		.td_l{
 			text-align: left;
 		}
 		.td_r{
 			text-align: right;
 		}
 	</style>
 	 <script type="text/javascript" src="${contextPath}/resources/lib/jquery/1.9.1/jquery.js"></script>
 	<script type="text/javascript" src="${contextPath}/resources/js/exchange/exchange_apply.js"></script>
 <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span>退换货管理 <span class="c-gray en">&gt;</span>申请退换货 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
  <div class="zp_pop" style="padding-left: 40px;padding-right: 40px">
 <form method="post" name="query_order_form"  id="query_form" action="${contextPath}/exchange/insert_exchange" >
	<table>
		<tr>
			<td style="text-align: left; padding-top: 10px; vertical-align: middle;">订单编号：
				<input id="orderNo" class="input-text radius" style="width: 250px"/>
				<button type="button" class="btn btn-success" onclick="searchAjaxJson('${contextPath}')"><i class="Hui-iconfont">&#xe665;</i> 查询</button>
				<span class="select-box" style="width:200px">
					<select style="width: 190px;" id="showProductId" class="select" onchange="chooseId(this.value)">
						<option value="">请选择商品编号</option>
					</select>        	
              	</span>	
			</td>
		</tr>
	</table>
    	  商品信息
       <hr style="color: green;">
        <table class="table table-border table-bordered table-bg">
          <tr class="text-c" >
             <th class="td_c" style="width: 20%;">订单编号</th>
             <th class="td_c" style="width: 40%;">商品名称</th>
             <th class="td_c" style="width: 20%;">颜色</th>
             <th class="td_c" style="width: 20%;">商品单价</th>
           </tr>
            <tr class="text-c" >
             <td class="td_c">
             	<span id="v_orderNo"></span>
             	<input type="hidden" id="orderNo_s" name="orderNo"  value="">
             </td>
             <td class="td_c">
             	<span id="v_prodName"></span>
             	<input type="hidden" id="prodName" name="prodName" value="">
             </td>
             <td class="td_c">
             	<span id="v_prodNo"></span>
             	<input type="hidden" id="prodNo" name="prodNo" value="">
            </td>
             <td class="td_c">
             	<span id="v_prodMileage"></span>里程
             	<input type="hidden" name="prodMileage" id="prodMileage" value=""></td>
           </tr>
            
          <tr class="text-c"  >  
             <th>退换货类型</th>
             <th>原因</th>
             <th>商品数量</th>
             <th>总计金额</th>
            </tr>
            <tr class="text-c">
             <td  style="text-align: left;">
             	  <span class="select-box radius" style="width:150px">            
          	
                       <select class="select" name="exchangeType" id="exchangeType" style="width:140px">
                      
                       <#if excheMapType??>
					    <#list excheMapType?keys as key>
					     <option  value="${key}">${excheMapType[key]}</option>
					 	</#list>
						</#if>	
						</select>
					</span>
             </td>
             <td class="td_c">	
               <span class="select-box radius" style="width:150px">            
          	 <select class="select" name="reson" id="reson" style="width:140px">
                          <option  value="">--请选择退货原因--</option>
               <#if excheMapReson??>
            	 <#list excheMapReson?keys as key>
					     <option  value="${key}">${excheMapReson[key]}</option>
				 </#list>
				</#if>	
              	</select>
					</span>
             </td>
             
             <td class="td_c"> 
             	<input type="text" id="buyNum" name="prodCount" value="" class="input-text radius" style="width: 70%;"> 件 
             <!-- 	<span id="v_buyNum"></span>  件 -->
            </td>
             <td class="td_c"> <span id="v_total"></span>里程 
             <input type="hidden" name="backMileage" id="backMileage" value=""></td>
            <input type="hidden" name="prodId" id="prodId" value=""></td>	
             
             </td>
           </tr> 
        </table>    
         <br>
         	商品外包装情况
       <hr style="color: green;">
      <table class="table table-border table-bordered table-bg">
          <tr class="text-c" >
             <td class="td_c" style="text-align: left;">外观 :
               <span class="select-box radius" style="width:150px">            
          	 <select class="select" name="face" id="" style="width:140px">
            	
   			<!-- <option  value="">--请选择外观--</option> -->
              <#if excheMapFace??>
                
            	 <#list excheMapFace?keys as key>
					     <option  value="${key}">${excheMapFace[key]}</option>
				 </#list>
				</#if>
				</select>
				</span>
			</td>
             <td class="td_c" style="text-align: left;">外包装: 
                  <span class="select-box radius" style="width:150px">            
          	 <select class="select" name="outerPackage" id="" style="width:140px">
           
              <#if excheMapPackage??>
                
            	 <#list excheMapPackage?keys as key>
					     <option  value="${key}">${excheMapPackage[key]}</option>
				 </#list>
				</#if>
             	 </select>
             	 </span>
		    </td>
           </tr>
        </table>     
        <br>
           	商品配件信息
          <hr style="color: green;">
         <table class="table table-border table-bordered table-bg">
          <tr class="text-c" >
             <td class="td_c" style="text-align: left;">商品配件: <textarea rows="4" cols="30" name="fittings"></textarea></td>
             <td class="td_c" style="text-align: left;">取货方式:
          <span class="select-box radius" style="width:150px">            
          	 <select class="select" name="takeStockWay" id="" style="width:140px">
              <#if excheMapTakeStockway??>
            
				 <#list excheMapTakeStockway?keys as key>
					     <option  value="${key}">${excheMapTakeStockway[key]}</option>
				 </#list>
			</#if>
			</select>
			</span>
             </td>
           
           </tr>
            
        </table>  
        <br>
           	配送信息
          <hr style="color: green;">
         <table class="table table-border table-bordered table-bg">
          <tr class="text-c" >
             <td class="td_c">申请人姓名 :
          
             	<input class="input-text  radius" placeholder="" id="exchanger"  name="exchanger" value=""  type="text">
             </td>
             <td class="td_c">	联系电话:
             <input class="input-text  radius" placeholder="" id="tel"  name="tel" value=""  type="text">
             </td>
             <td class="td_c">	 手机号码:
              <input class="input-text  radius" placeholder="" id="phone"  name="phone" value=""  type="text">
            
             </td>
           </tr>
            
            
           
             	 
                   
             <td class="td_c"> ${exchange.tel}	</td>
			 <td class="td_c"> ${exchange.phone}  </td>
             <td class="td_c"> ${exchange.provCityArea}${exchange.address}	</td>
           
           	<tr>
           	  <td   style="text-align: left;">      配送地址 ：
		   	<select name="provId" id="provId" onchange="changeProvCityArea(1,this.value);"> 
		          <option  value="">请选择省</option>
		          <#if basProv?? && (basProv?size &gt; 0) >
        		  <#list basProv as provs >
        		  	  <option   value="${provs.provId}">${provs.provName}</option>
        		  </#list>
		          </#if>
		          </select> 
		          <select name="cityId" id="cityId" onchange="changeProvCityArea(2,this.value);"> 
		          <option   value="">请选择市</option>
		          
		          </select>
		          <select  id="areaId" name="aredId"> 
		          <option value="">请选择区</option>
		          
		          </select>
		          
		          </td>
		          <td   style="text-align: left;"> 街道地址:
		          	<input  class="input-text  radius" id="address"  name="address">
		        	<input type="hidden" id="provCityArea" name="provCityArea"  value="" />
        			<input type="hidden" id="orderType" name="orderType"  value="" />
        		 </td>
		          	<td colspan="3" style="text-align: left;">    邮编：<input   class="input-text  radius" name="recpostNo" type="text"   id="recpostNo" value=" "/>
		          </td>  
		          
           	</tr>
           	<tr>
	           	 <td colspan="3">
	           	<input  type="button"  class="btn btn-success" id="sunmitForm" onclick="submitForm()" value='提交'>    
	           	</td>
           	</tr>
        </table>  
        <br>
      <!--  	 个人信息
          <hr style="color: green;">
         <table class="table table-border table-bordered table-bg">
          <tr class="text-c"  >
          		<td  style="text-align: left;" >银行账户姓名: ${exchange.realName} </td>
				<td  style="text-align: left;" >开户银行名: ${exchange.bankName} </td>
				<td  style="text-align: left;" >银行卡号: ${exchange.cardNo} </td>
           </tr>
        </table>
            -->
		
      </form>   
    <input  type="hidden" id="basProvJson" value='${basProvJson}'>
	<input  type="hidden" id="basCityJson" value='${basCityJson}'>
	<input  type="hidden" id="basAreaJson" value='${basAreaJson}'>
     
    </div>
    
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript">

	var basProvList = $("#basProvJson").val()  ;
	var basCityList = $("#basCityJson").val() ;
	var basAreaList = $("#basAreaJson").val() ;   
	function changeProvCityArea(state ,No){
		if(state==1){
			selProv(No);
		}
		if(state==2){
			selCity(No);
		}
		if(state==3){
			//selArea(No);
		}
		
		
	}
//选择市区	
function selProv(No){
	var json =jQuery.parseJSON(basCityList);
	$("#cityId").empty(); 
	$("#areaId").empty();
	$("#areaId").html('<option value="">请选择市</option>'); 
	var addHtml="";
	addHtml+= '<option value="">请选择市</option>';
	for (var int = 0; int < json.length; int++) {
		if(No==json[int]['provId']){  
			addHtml+= '<option value="'+json[int]['id']+'">'+json[int]['cityName']+'</option>';
		}
	}
	 $("#cityId").html(addHtml); 
	
}	
//选择县区区	
function selCity(No){
	var json =jQuery.parseJSON(basAreaList);
	$("#areaId").empty(); 
	var addHtml="";
	addHtml+= '<option value="">请选择区</option>';
	for (var int = 0; int < json.length; int++) {
		if(No==json[int]['cityId']){  
			addHtml+= '<option value="'+json[int]['areaId']+'">'+json[int]['areaName']+'</option>';
		}
	}
	
	 $("#areaId").html(addHtml); 
	
}	
</script>
<@frame.end "default">
</@frame.end>

 